﻿using EzDesk.Core.Interface;
using System.Web.Security;
using EzDesk.Core.Model;
using System.Configuration;

namespace EzDesk.Core.ServiceImpl.Services
{
    public partial class CoreClientService : ICoreClientService
    {

        #region [ ClientManagement Methods ]

        public string GetClientBaseUrl()
        {
            EzDeskUserAgentType userAgentType = _operationProperties.UserAgent;

            var clientBaseUrl = "";
            switch (userAgentType)
            {
                case EzDeskUserAgentType.GenericMobile:
                    clientBaseUrl = ConfigurationManager.AppSettings["GenericMobileLocation"];
                    break;
                case EzDeskUserAgentType.DesktopClient:
                    clientBaseUrl = ConfigurationManager.AppSettings["DesktopClientLocation"];
                    break;
            }
            return clientBaseUrl;
        }
        #endregion
    }
}